import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/workorder/getList',
    method: 'post',
    data: query
  })
}

export function fetchArticle(id) {
  return request({
    url: '/workorder/getDetail',
    method: 'post',
    data: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/workorder/getDetail',
    method: 'post',
    data: { pv }
  })
}

export function createArticle(data) {
  return request({
    url: '/workorder/save',
    method: 'post',
    data
  })
}

export function updateArticle(data) {
  return request({
    url: '/workorder/save',
    method: 'post',
    data
  })
}
